@import 'nib'

// mixin
linearGradient(from, to)
  f = unquote('#' + from)
  t = unquote('#' + to)
  ief = '#FF' + from
  iet = '#FF' + to
  background: -webkit-linear-gradient(top, f, t)
  background: -moz-linear-gradient(top, f, t)
  background: -ms-linear-gradient(f, t)
  background: -o-linear-gradient(f, t)
  filter: unquote('progid:DXImageTransform.Microsoft.gradient(startColorstr=' + ief + ', endColorstr=' + iet + ')')

.ui-nav
  position: relative
  a
    text-decoration: none;
    &:hover
      text-decoration: none;

.ui-nav ul,
.ui-nav li
  list-style-type: none

// 一级导航
.ui-nav-main
  clearfix()
  margin: 0
  padding-left: 10px
  border-radius: 2px 2px 0 0
  linearGradient(F39100,  F17A00)

.ui-nav-item
  float: left
  margin: 7px 5px 0 0
  a
    display: inline-block
    _display: inline;
    _zoom: 1
    height: 35px
    padding: 0 15px
    line-height: 35px
    color: #fff
    font-weight: bold
    font-size: 14px
    &:hover
      color: #fff
      linearGradient(F49C25, F49726)
      border-radius: 2px 2px 0 0

.ui-nav-item-current a,
.ui-nav-item-current a:hover
  background: #fff
  filter: none
  color: #6D6969
  border-radius: 2px 2px 0 0

// 二级导航
.ui-nav-submain
  display: none
  absolute: left 10px top 42px
  margin: 0
  padding: 0

.ui-nav-subitem
  float: left
  margin: 5px 10px 0 0
  a
    display: inline-block
    *display: inline
    zoom: 1
    padding: 0 15px
    height: 26px
    line-height: 26px
    background: transparent
    color: #868686
    font-weight: normal
    font-size: 12px
    border-radius: 3px
    &:hover
      height: 24px
      line-height: 24px
      padding: 0 14px
      background: transparent
      box-shadow: 0px -1px 0px #F6F6F6
      border: 1px solid #CECECE
      border-radius: 3px

.ui-nav-subitem-current a,
.ui-nav-subitem-current a:hover
  height: 24px
  line-height: 24px
  padding: 0 14px
  border-left: 1px solid #DADADA
  border-right: 1px solid #DADADA
  border-top: 1px solid #BEBEBE
  border-bottom: 1px solid transparent
  _border-bottom: 1px solid #DADADA
  box-shadow: inset 0px 1px 0px #DADADA
  background: #E7E7E7

// 二级导航的背景
.ui-nav-subcontainer
  height: 37px
  border-left: 1px solid #CCCCCC
  border-right: 1px solid #CCCCCC
  border-bottom: 1px solid #CCCCCC
  linearGradient(FEFEFE,  F7F7F7)

// 控制二级导航显隐
.ui-nav-item-current .ui-nav-submain
  display: block

.ui-nav-nosub .ui-nav-subcontainer,
.ui-nav-nosub .ui-nav-subitem
  display: none
